GROOVY-12019: Enable gradle configuration cache#2544
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2544 +/- ##
==================================================
+ Coverage 68.1844% 68.1892% +0.0048%
- Complexity 33086 33091 +5
==================================================
Files 1508 1508
Lines 126130 126130
Branches 22878 22878
==================================================
+ Hits 86001 86007 +6
+ Misses 32490 32486 -4
+ Partials 7639 7637 -2 🚀 New features to boost your workflow:
|
918bf99 to
c2a897e
Compare
There was a problem hiding this comment.
Pull request overview
This PR targets GROOVY-12019 by making the build more compatible with Gradle’s configuration cache, primarily by removing task-graph based logic, avoiding execution-time Project access patterns that break CC, and conditionally applying documentation tooling that is not yet CC-compatible.
Changes:
- Enables configuration cache by default (with CC problems downgraded to warnings) and refactors multiple build scripts/plugins to be CC-friendly.
- Makes documentation-related plugins/tasks conditional to avoid CC-incompatible third-party plugins unless needed.
- Reworks shaded-jar manifest generation to avoid capturing non-serializable Gradle state and improves task input modeling.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| subprojects/groovy-groovydoc/build.gradle | Avoids Project.mkdir usage; uses File.mkdirs() for CC-safe directory creation. |
| subprojects/groovy-binary/build.gradle | Gates Asciidoctor task configuration and distribution doc inclusion behind documentation-build detection. |
| subprojects/groovy-ant/build.gradle | Makes external jar resolution CC-safe by capturing a FileCollection at configuration time. |
| gradle/verification-metadata.xml | Updates dependency verification metadata for updated/added build dependencies. |
| gradle.properties | Enables configuration cache by default and sets CC problems to warn. |
| build.gradle | Removes task graph usage for the parallel/generateLicenseReport incompatibility check. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy | Replaces task-graph-based decisions with StartParameter-based booleans; adds documentation-build detection. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy | Makes performance test task arguments CC-safe via CommandLineArgumentProvider and modeled inputs. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy | Refactors task properties for CC safety; switches OSGi manifest generation to BND Analyzer. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/GroovydocAntPlugin.groovy | Improves CC safety by avoiding project.ant and by modeling source dirs as task inputs. |
| build-logic/src/main/groovy/org.apache.groovy-tested.gradle | Replaces direct System.properties access with Providers; removes task-graph hook; CC-safe logging and cleanup. |
| build-logic/src/main/groovy/org.apache.groovy-published-library.gradle | Removes signing logic dependency on task graph; adds publish ordering constraint for local file repository publishes. |
| build-logic/src/main/groovy/org.apache.groovy-publish-validation.gradle | Adjusts publish validation to reduce CC-unfriendly configuration-time captures. |
| build-logic/src/main/groovy/org.apache.groovy-library.gradle | Migrates JarJar manifest configuration from Gradle OSGi DSL to BND instructions. |
| build-logic/src/main/groovy/org.apache.groovy-documented.gradle | Simplifies Javadoc tag configuration using tags(...) in the options block. |
| build-logic/src/main/groovy/org.apache.groovy-distribution.gradle | Applies Asciidoctor/PDF plugins only for documentation builds; avoids execution-time project.version access. |
| build-logic/src/main/groovy/org.apache.groovy-core.gradle | Makes compile configuration CC-friendlier; refactors grammar output relocation to avoid configuration-time file operations. |
| build-logic/src/main/groovy/org.apache.groovy-base.gradle | Applies Asciidoctor plugin only when needed; adds asciidocElements variant; makes JarJar task configuration CC-safe. |
| build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle | Marks Asciidoctor tasks as not CC-compatible (until upstream plugin supports CC). |
| build-logic/build.gradle | Adds BND library and bumps JMH Gradle plugin version. |
8b9484b to
474ddf8
Compare
|
✅ All tests passed ✅🏷️ Commit: 474ddf8 Learn more about TestLens at testlens.app. |



No description provided.